package com.tao.YanMoDesignPattern.Mediator.pattern;

/**
 * @Author Mi_Tao
 * @Date 2023/7/23
 * @Description
 * @Version 1.0
 **/
public class ConcreteMediator implements Mediator{

    // 持有并维护同事A
    private ConreteColleagueA conreteColleagueA;
    // 持有并维护同事B
    private ConreteColleagueB conreteColleagueB;

    public void setConreteColleagueA(ConreteColleagueA conreteColleagueA) {
        this.conreteColleagueA = conreteColleagueA;
    }

    public void setConreteColleagueB(ConreteColleagueB conreteColleagueB) {
        this.conreteColleagueB = conreteColleagueB;
    }

    @Override
    public void changed(Colleague colleague) {
        // 某个同事发生了变化，通常需要与其他同事交互
        // 具体协调相应的同事对象来实现协作行为
    }
}
